# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Leif Warner <abimelech@gmail.com>

pkgname=python-rdflib
pkgver=5.0.0
pkgrel=3
pkgdesc="A Python library for working with RDF, a simple yet powerful language for representing information"
arch=('any')
url="http://rdflib.net/"
license=('BSD')
depends=('python-isodate' 'python-pyparsing')
optdepends=('python-html5lib: for html support'
            'python-requests: for sparql support')
makedepends=('python-setuptools')
checkdepends=('python-nose' 'python-six' 'python-html5lib' 'python-requests' 'python-networkx'
              'python-doctest-ignore-unicode')
source=(rdflib-$pkgver.tar.gz::https://github.com/RDFLib/rdflib/tarball/$pkgver)
sha512sums=('d879c9312a5e6a69ef2edf7931f5e20f6d5c59ce6feb2397e5aeb09843f3568c284f9175b24ac4d513b720dcea82076776d33bfc4492f5d82a17c644586e7b48')

build() {
  cd RDFLib-rdflib-*
  python setup.py build
}

check() {
  cd RDFLib-rdflib-*
  #python setup.py test # Will download and install rdflib again
  nosetests3
}

package() {
  cd RDFLib-rdflib-*
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644  LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
